﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using DbSharp.Framework.TestEngine;

namespace DbSharp.GuiRunner.UI
{
    partial class FormTestResult : Form
    {
        public FormTestResult()
        {
            InitializeComponent();
        }

        
        public TestRunnerBase TestRunner { get; set; }

        private void FormTestResult_Load(object sender, EventArgs e)
        {
            if (TestRunner == null)
                return;

            if (TestRunner.CaseExecuteResult == null)
                return;

            this.Text= "Result of "+TestRunner.CaseName;
            this.richTextBox1.Text = TestRunner.CaseExecuteResult.ToString();
        }

        private void FormTestResult_KeyPress(object sender, KeyPressEventArgs e)
        {
            if (Convert.ToByte(e.KeyChar) == (byte)Keys.Escape)
            {
                e.Handled = true;
                this.Close();
            }
        }

  
             
    }
}
